﻿
namespace QDP.Platform.Loader
{
    public static class ParseFactory
    {
        public static IParser ParserCreator(string Mode)
        {
            IParser parser = null;
            switch (Mode)
            {
                case "ZipAssembly":
                case "0":
                    parser = new ZipAssemblyParser();
                    //ParseZipAssembly(e.MemoryStream);//  ZIP压缩包程序集
                    break;
                case "DllAssembly":// DLL程序集
                case "1":
                    parser = new SingleAssemblyParser();
                    //ParseDllAssembly(e.MemoryStream);
                    break;
                case "ZipTheme":
                case "2":
                    parser = new ZipThemeParser();
                    break;
                case "XamlTheme":
                case "3":
                    parser = new XamlThemeParser();
                    break;
                case "ThemeAssembly":
                case "4":
                    parser = new ThemeAssemblyParser();
                    break;
            }
            return parser;
        }
    }
}
